<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
			h1,p{
				text-align: center;
			}
		</style>
	</head>
	<body>
		<h1 id="container"></h1>
		<p id="time"></p>
	</body>
</html>
<script>
	onload=function(){
		setInterval(function(){
			let status = window.navigator.onLine;
			let statusTag = status?"<span style='color:green;'>正常</span>":"<span style='color:red;'>异常</span>"
			document.getElementById("container").innerHTML = statusTag;
			document.getElementById("time").innerHTML=new Date()
		},1000)
	}
</script>
